@import '../color.scss';

.zhui-progress {
  &-wrapper {
    margin-bottom: 42px;
    height: 4px;
    border-radius: 4px;
  }

  &-inner {
    position: relative;
    float: left;
    height: 100%;
    border-radius: 4px;
    background-color: $primary;
    transform-origin: left;
  }

  &-outer {
    float: right;
    height: 100%;
    background-color: #f5f5f5;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    transform-origin: right;
  }

  &-tag {
    box-sizing: border-box;
    position: absolute;
    top: -5px;
    right: -10px;
    width: 20px;
    height: 30px;
    font-size: 12px;
    border-radius: 3px;
    background: $primary;
    color: #fff;
    border-top-right-radius: 20px;
    border-top-left-radius: 20px;
    padding-top: 10px;
    text-align: center;
    transform-origin: top;

    &::before {
      content: '';
      position: absolute;
      top: 4px;
      left: 7px;
      width: 6px;
      height: 6px;
      background: #f5f5f5;
      border-radius: 50%;
    }
  }

  &-active .zhui-progress-tag {
    animation: swing 1.7s infinite;    
  }

  &-exception{
    background-color: $haitang;

    .zhui-progress-tag {
      background-color: $haitang;
    }
  }
}

@keyframes swing {
  0% {
    transform: rotatez(7deg);
  }
  50% {
    transform: rotatez(-7deg);
  }
  100% {
    transform: rotatez(7deg);
  }
}
